import uvicorn
from fastapi import FastAPI
from app.get_chart_data import app03

import sys
import os
# 获取当前脚本所在目录的父目录（即项目顶层目录）
top_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(top_dir)
os.chdir(os.path.dirname(os.path.abspath(__file__)))

app = FastAPI()

app.include_router(app03, prefix='/app03')


@app.get("/")
def read_root():
    return {"Hello": "World"}

if __name__ == "__main__":
    uvicorn.run(app, host="127.0.0.1", port=8000)
